//
//  GRGoodDetailContentCell.m
//  YC_GRice
//
//  Created by luojinrong11 on 2018/8/27.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import "GRGoodDetailContentCell.h"
#import "GRGoodDetailTipView.h"
@implementation GRGoodDetailContentCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)setDetailModel:(GRGoodDetailPageModel *)detailModel{
   
    _detailModel = detailModel;
    self.titleLabel.text = detailModel.title;
    self.contentLabel.text = detailModel.content;
    self.priceLabel.text = [NSString stringWithFormat:@"%.2lf",detailModel.totalPrice];
    NSMutableAttributedString * attributingStr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"￥%.2lf", detailModel.totalPrice] attributes:@{NSForegroundColorAttributeName:HEXCOLOR(0x999999),NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]}];
    self.orgnialLabel.attributedText = attributingStr;
    self.contentLabel.text =  detailModel.content;
    
}

- (IBAction)storeAction:(id)sender {
    GRGoodDetailTipView *tipView = [GRGoodDetailTipView xx_instantiateFromNib];
    [tipView show];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
